﻿  function PictureModel(imageUrl, fullsizeImageUrl, title) {
            var self = this;
            self.ImageUrl = ko.observable(imageUrl);
            self.FullSizeImageUrl = ko.observable(fullsizeImageUrl);
            self.Title = ko.observable(title);
        }

        function ProductSpecificationAttributeModel(attrName, attrOption) {
            var self = this;
            self.AttributeName = ko.observable(attrName);
            self.AttributeOptionName = ko.observable(attrOption);
       }

        function ProductOverviewModel(id, name, shortDescription, fullDescription, minprice, picModel, specAttributes) {
            var self = this;

            self.Id = ko.observable(id);
            self.Name = ko.observable(name);
            self.ShortDescription = ko.observable(shortDescription);
            self.FullDescription = ko.observable(fullDescription);
            self.MinPrice = ko.observable(minprice);

            var pm = new PictureModel(picModel.ImageUrl, picModel.FullSizeImageUrl, picModel.Title);
            self.PictureModel = ko.observable(pm);

            self.SpecAttributes = ko.observableArray(specAttributes);
        }
